<!DOCTYPE html>
<html th:replace="layout/layout"
      xmlns:th="http://www.thymeleaf.org">
<style th:fragment="styles">
</style>
<div th:fragment="content">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>生猪运输台账</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="/index?menuId=1">首页</a>
                </li>
                <li>
                    <a>材料报备</a>
                </li>
                <li class="active">
                    <strong>生猪运输台账</strong>
                </li>
            </ol>
        </div>
        <div class="col-lg-2">
            <input type="text" id="k" style="display:none;" th:value="${userType}">
        </div>
    </div>
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox ">
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <input type="text" id="search_CarTime" placeholder="运载时间"
                                           name="search_CarTime" autocomplete="off" class="form-control">
                                </div>
                            </div>
                            <div class="col-lg-2">
                                <button type="submit" class="btn btn-primary  btn-rounded  btn-sm" id="search"
                                        onclick="doSearch()"><i
                                        class="fa fa-search"></i>&nbsp;搜索
                                </button>
                                <button type="submit" class="btn btn-warning  btn-rounded  btn-sm" id="refresh"
                                        onclick="doRest()"><i
                                        class="fa fa-refresh"></i>&nbsp;重置
                                </button>
                            </div>
                        </div>

                        <div class="jqGrid_wrapper">
                            <div class="btn-group-sm" id="toolbar" role="group" style="display:block;">
                                <a class="btn btn-success" name="AddNew" id="AddNew" data-toggle="modal"
                                   data-target="#myModalAdd" onclick="addRecord();">
                                    <i class="fa fa-plus"></i> 新增
                                </a>
                            </div>

                            <table class="table table-striped table-bordered table-hover " id="tableList">
                            </table>


                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--模态框-->
    <div class="modal inmodal" id="myModalAdd" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog  modal-lg">
            <div class="modal-content animated bounceInRight">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span
                            aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">生猪运输台账信息</h4>
                </div>
                <div class="modal-body">
                    <!--@*模态框body*@-->
                    <div class="tabs-container">

                        <form class="form-horizontal" id="myform">
                            <div class="panel-body form-horizontal">
                                <div class="row">
<!--                                    <label class="col-lg-2 control-label">是否已阅读温馨提示内容</label>-->
<!--                                    <div class="col-lg-4">-->
<!--                                        <div class="form-group">-->
<!--                                            <select id='text_read' name='text_read' class="form-control"-->
<!--                                                    placeholder="是否已阅读温馨提示内容">-->
<!--                                                <option value="是" selected>是</option>-->
<!--                                                <option value="否">否</option>-->
<!--                                            </select>-->
<!--                                        </div>-->
<!--                                    </div>-->
                                    <label class="col-lg-2 control-label">生猪运输车辆备案号</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_recordNo" name="text_recordNo"
                                                   placeholder="生猪运输车辆备案号" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">生猪运输车辆备案表</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <a href="javascript:;" class="a-upload">
                                                <img onclick="$('#text_recordForm').click()" id="showImage" src="" style="display: none" class="img-responsive">
                                                <input type="file" id="text_recordForm" name="text_recordForm" onchange="ImportShipmentStatusList();" />点击这里上传图片(格式：.png,.gif,.jpg,尺寸：420*250)
                                            </a>
                                            <input name="imgURL" id="imgURL" class="easyui-validatebox" type="hidden">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">

                                    <label class="col-lg-2 control-label">运载时间</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_carTime" name="text_carTime" placeholder="运载时间"
                                                   autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">检疫证明号码</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_proofCode" name="text_proofCode"
                                                   placeholder="检疫证明号码" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">

                                    <label class="col-lg-2 control-label">生猪头数</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="number" id="text_pigNumber" name="text_pigNumber"
                                                   placeholder="生猪头数" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">起运省</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select id='text_startProvince' name='text_startProvince'
                                                    class="form-control" placeholder="起运省">
                                                <option value="0" selected>福建省</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">起运市</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select id='text_startCity' name='text_startCity' class="form-control"
                                                    placeholder="起运市" onchange="loadDistricts(this)">
                                            </select>
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">起运区县</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select id='text_startDistrict' name='text_startDistrict'
                                                    class="form-control" placeholder="起运区县"  onchange="loadTowns(this)">
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">

                                    <label class="col-lg-2 control-label">起运乡镇</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select id='text_startTownship' name='text_startTownship'
                                                    class="form-control" placeholder="起运乡镇">
                                            </select>
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">起运详细地址</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_startDetailed" name="text_startDetailed"
                                                   placeholder="起运详细地址" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">

                                    <label class="col-lg-2 control-label">养殖户名称</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_farmerName" name="text_farmerName"
                                                   placeholder="养殖户名称" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">到达省</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select id='text_endProvince' name='text_endProvince' class="form-control"
                                                    placeholder="到达省">
                                                <option value="0" selected>福建省</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">

                                    <label class="col-lg-2 control-label">到达市</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select id='text_endCity' name='text_endCity' class="form-control"
                                                    placeholder="到达市" onchange="loadDistricts2(this)">
                                            </select>
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">到达区县</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select id='text_endDistrict' name='text_endDistrict' class="form-control"
                                                    placeholder="到达区县" onchange="loadTowns2(this)">
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">

                                    <label class="col-lg-2 control-label">到达乡镇</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select id='text_endTownship' name='text_endTownship' class="form-control"
                                                    placeholder="到达乡镇">
                                            </select>
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">到达详细地址</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_endDetailed" name="text_endDetailed"
                                                   placeholder="到达详细地址" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">

                                    <label class="col-lg-2 control-label">运载路径</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_route" name="text_route" placeholder="运载路径"
                                                   autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">装载前清洗消毒情况</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_startDisinfection" name="text_startDisinfection"
                                                   placeholder="装载前清洗消毒情况" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">

                                    <label class="col-lg-2 control-label">装载后清洗消毒情况</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_endDisinfection" name="text_endDisinfection"
                                                   placeholder="装载后清洗消毒情况" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">染疫、病死、死因不明生猪处置情况</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="text" id="text_disposal" name="text_disposal"
                                                   placeholder="染疫、病死、死因不明生猪处置情况" autocomplete="off"
                                                   class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">

                                    <label class="col-lg-2 control-label">备注</label>
                                    <div class="col-lg-10">
                                        <div class="form-group">
                                            <input type="text" id="text_remark" name="text_remark" placeholder="备注"
                                                   autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>

                    <!--模态框body结束-->
                </div>
                <div class="modal-footer">
                    <button type="button" id="save" name="save" class="btn btn-success" onclick="saveRecord();"><i
                            class="fa fa-save"></i>&nbsp;提交
                    </button>
                    <button type="button" id="close" name="close" class="btn btn-danger" data-dismiss="modal"><i
                            class="fa fa-close"></i>&nbsp;关 闭
                    </button>
                </div>
            </div>
        </div>
    </div>

</div>
<div th:fragment="scriptRef">
    <script th:src="@{/js/lib/inspinia/js/plugins/laydate/laydate.js}"></script>
    <script th:src="@{/js/form/pigAccount.js}"></script>
    <!--表单验证-->
    <script th:src="@{/js/lib/validate/jquery.validate.min.js}"></script>
    <!-- 文件上传 -->
    <script th:src="@{/js/Scripts/ajaxfileupload.js}"></script>
</div>
<script th:fragment="scripts" type="text/javascript">
    PigAccount.init();
</script>
</html>
